﻿using IotContract.Dtos.Servers.Process.F29;
using IotContract.Dtos.Servers.Process;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IotContract.Models.Jobs.F29;
using IotContract.Models.Process;
using IotContract.Enums;

namespace F29ServerProcess.Interfaces;
/// <summary>
/// 任务服务
/// </summary>
public interface IProcessJobService
{
    /// <summary>
    /// 入库任务
    /// </summary>
    ConcurrentDictionary<string, ConcurrentDictionary<string, F29EnterJob>> EnterJobs { get; set; } 
    /// <summary>
    /// 出库任务
    /// </summary>
    ConcurrentDictionary<string, ConcurrentDictionary<string, F29OutJob>> OutJobs { get; set; } 
    /// <summary>
    /// 火警任务
    /// </summary>
   ConcurrentDictionary<string, ConcurrentDictionary<string, F29MoveJob>> FireJobs { get; set; }
    /// <summary>
    /// 移库任务
    /// </summary>
    ConcurrentDictionary<string, ConcurrentDictionary<string, F29MoveJob>> MoveJobs { get; set; }

    /// <summary>
    /// 充放电任务
    /// </summary>
    ConcurrentDictionary<string,F29FmtJob> FmtJobs { get; set; }

    /// <summary>
    /// 移除Job
    /// </summary>
    /// <param name="job"></param>
    /// <param name="type"></param>
    string RemoveJob(ProcessBaseData job, ProcessProviderType type);
    /// <summary>
    /// 添加Job
    /// </summary>
    /// <param name="job"></param>
    /// <param name="type"></param>
    string AddJob(ProcessBaseData job, ProcessProviderType type);
    /// <summary>
    /// 获取Job
    /// </summary>
    /// <param name="type"></param>
    /// <returns></returns>
    List<ProcessBaseData> GetJobs(ProcessProviderType type);
    /// <summary>
    /// 移除任务
    /// </summary>
    /// <param name="jobKey"></param>
    void RemoveJob(string jobKey);
}
